package com.example.elm_server_api.domain;

import java.io.Serializable;
import lombok.Data;

/**
 * 订单详情表
 * @TableName order_detail
 */
@Data
public class OrderDetail implements Serializable {
    /**
     * 主键
     */
    private Integer id;

    /**
     * 订单ID
     */
    private String orderId;

    /**
     * 用户名
     */
    private String userUsername;

    /**
     * 用户联系电话
     */
    private String userMobile;

    /**
     * 用户地址ID
     */
    private Integer userAddressId;

    /**
     * 用户详细地址
     */
    private String userAddress;

    /**
     * 商铺名字
     */
    private String shopShopname;

    /**
     * 商铺联系电话
     */
    private String shopMobile;

    /**
     * 商铺详细地址
     */
    private String shopAddress;

    /**
     * 送餐员ID
     */
    private Integer deliverId;

    /**
     * 送餐员姓名
     */
    private String deliverName;

    /**
     * 送餐员联系电话
     */
    private String deliverMobile;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderDetail other = (OrderDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getUserUsername() == null ? other.getUserUsername() == null : this.getUserUsername().equals(other.getUserUsername()))
            && (this.getUserMobile() == null ? other.getUserMobile() == null : this.getUserMobile().equals(other.getUserMobile()))
            && (this.getUserAddressId() == null ? other.getUserAddressId() == null : this.getUserAddressId().equals(other.getUserAddressId()))
            && (this.getUserAddress() == null ? other.getUserAddress() == null : this.getUserAddress().equals(other.getUserAddress()))
            && (this.getShopShopname() == null ? other.getShopShopname() == null : this.getShopShopname().equals(other.getShopShopname()))
            && (this.getShopMobile() == null ? other.getShopMobile() == null : this.getShopMobile().equals(other.getShopMobile()))
            && (this.getShopAddress() == null ? other.getShopAddress() == null : this.getShopAddress().equals(other.getShopAddress()))
            && (this.getDeliverId() == null ? other.getDeliverId() == null : this.getDeliverId().equals(other.getDeliverId()))
            && (this.getDeliverName() == null ? other.getDeliverName() == null : this.getDeliverName().equals(other.getDeliverName()))
            && (this.getDeliverMobile() == null ? other.getDeliverMobile() == null : this.getDeliverMobile().equals(other.getDeliverMobile()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getUserUsername() == null) ? 0 : getUserUsername().hashCode());
        result = prime * result + ((getUserMobile() == null) ? 0 : getUserMobile().hashCode());
        result = prime * result + ((getUserAddressId() == null) ? 0 : getUserAddressId().hashCode());
        result = prime * result + ((getUserAddress() == null) ? 0 : getUserAddress().hashCode());
        result = prime * result + ((getShopShopname() == null) ? 0 : getShopShopname().hashCode());
        result = prime * result + ((getShopMobile() == null) ? 0 : getShopMobile().hashCode());
        result = prime * result + ((getShopAddress() == null) ? 0 : getShopAddress().hashCode());
        result = prime * result + ((getDeliverId() == null) ? 0 : getDeliverId().hashCode());
        result = prime * result + ((getDeliverName() == null) ? 0 : getDeliverName().hashCode());
        result = prime * result + ((getDeliverMobile() == null) ? 0 : getDeliverMobile().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", userUsername=").append(userUsername);
        sb.append(", userMobile=").append(userMobile);
        sb.append(", userAddressId=").append(userAddressId);
        sb.append(", userAddress=").append(userAddress);
        sb.append(", shopShopname=").append(shopShopname);
        sb.append(", shopMobile=").append(shopMobile);
        sb.append(", shopAddress=").append(shopAddress);
        sb.append(", deliverId=").append(deliverId);
        sb.append(", deliverName=").append(deliverName);
        sb.append(", deliverMobile=").append(deliverMobile);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}